<!-- HTML5文件 -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
		<title>个人信息页</title>
		<link rel="stylesheet" href="assets/agile/css/agile.layout.css">
		<link rel="stylesheet" href="assets/agile/css/flat/flat.component.css">
		<link rel="stylesheet" href="assets/agile/css/flat/flat.color.css">
		<link rel="stylesheet" href="assets/agile/css/flat/iconline.css">
		<link rel="stylesheet" href="assets/agile/css/flat/iconform.css">
		<link rel="stylesheet" href="assets/component/timepicker/timepicker.css">
		<link rel="stylesheet" href="assets/app/css/app.css">
		<link rel="stylesheet" href="assets/my/common/style.css" />
	</head>
	<body>
		<div id="section_container">
			<section id="form_section" data-role="section" class="active">
				<header>
					<div class="titlebar">
				    	<a data-toggle="back" href="#"><i class="iconfont iconline-arrow-left"></i></a>
						<h1 class="title">卡信息</h1>
					</div>

				</header>

				<article data-role="article" id="main_article" data-scroll="verticle" class="active" style="top:44px;bottom:0px;">
					<div class="scroller">
						<form class="form-square">
							<label class="label-left">用户ID</label>
							<label class="label-right" id="userid"></label>
						
							<label class="label-left">卡主姓名</label>
							<label class="label-right" id="name"></label>
						    
						    <label class="label-left">手机</label>
							<label class="label-right" id="phone"></label>
							
							<label class="label-left" id="IdentityType"></label>
							<label class="label-right" id="sfid"></label>
							
							<label class="label-left">卡号</label>
							<label class="label-right" id="card"></label>
							
							<label class="label-left">物理卡号</label>
							<label class="label-right" id="wlkh"></label>
							
							<label class="label-left">卡状态</label>
							<label class="label-right" id="kzt"></label>
							
							<label class="label-left">余额</label>
							<label class="label-right" id="ye"></label>
							
							<button class="block cancel" href="#list" data-toggle="html" class="navigate-right" id="bdbtn">
								解除绑定
							</button>
		  				</form>
						
					</div>
				</article>
			</section>
		</div>
		
		<!--- third --->
		<script src="assets/third/jquery/jquery-2.1.3.min.js"></script>
		<script src="assets/third/jquery/jquery.mobile.custom.min.js"></script>
		<script src="assets/third/iscroll/iscroll-probe.js"></script>
		<script src="assets/third/arttemplate/template-native.js"></script>
		<!-- agile -->
		<script type="text/javascript" src="assets/agile/js/agile.js"></script>		
		<!--- bridge --->
		<script type="text/javascript" src="assets/bridge/exmobi.js"></script>
		<script type="text/javascript" src="assets/bridge/agile.exmobi.js"></script>
		<!-- app -->
		<script src="assets/component/timepicker/agile.timepicker.js"></script>	
		<script type="text/javascript" src="assets/component/extend.js"></script>
		<script type="text/javascript" src="assets/app/js/app.js"></script>
		<!-- my -->
		<script type="text/javascript" src="assets/my/common/my.js"></script>
		
		<script>
		$('#main_article').on('articleload', function(){//监听主页面打开事件,判断是否有COOKIE,并进行自动登录.
			if(getCookie("UserID")>0){
				var _url=encodeURIComponent("http://182.92.241.133:8001/API/CustomerInfo/GetBanlance?CustomerID="+GetURLString("id")+"&DeviceID=aabbccddee&MarketNo="+GetURLString("sc")+"");
				myAjax(_url,czPage);//进行跨域请求json
			}else{
				A.alert('错误','请先进行登陆操作',function(){
				    A.Controller.html("login.html"); 
				});
			}
		});

		function czPage(json){//供跨域请求获取到的json反向操作
			//A.showToast(json.customerInfo.Balance);
			$("#userid").text(json.customerInfo.CustomerID);
			$("#name").text(json.customerInfo.CustomerName);
			$("#phone").text(json.customerInfo.Mobile);
			$("#IdentityType").text(json.customerInfo.IdentityType);
			$("#sfid").text(json.customerInfo.IdentityCode);
			$("#card").text(json.customerInfo.CustomerCode);
			$("#wlkh").text(json.customerInfo.PhysicalCode);
			$("#kzt").text(json.customerInfo.States);
			$("#ye").text(json.customerInfo.Balance);
		}
		
		$('#bdbtn').on(A.options.clickEvent,function(){
			var _url=encodeURIComponent("http://182.92.241.133:8001/API/FrontBackInf/UnBindCard?userID="+getCookie("UserID")+"&customerID="+$("#userid").text()+"&marketNo="+GetURLString("sc")+"&softType=1");
			myAjax(_url,tzlb);//进行跨域请求json
			return false;
		});
		function tzlb(json){//供跨域请求获取到的json反向操作
			A.alert('成功','卡号:'+$("#card").text()+'解除绑定成功<br>返回列表',function(){
			    A.Controller.html("card_list.html"); 
			});
		}
		</script>
	</body>
</html>